/* Author : Putri Andita R
 * 		    091511059
 * Proyek 4*/


package jtk.project4.fleet.field;

import java.awt.FlowLayout;

import nl.coderight.jazz.form.FormField;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.button.PushButton;

public class PhotoTombolField extends GroupControl{
	
	private PushButton addImageButton;
	private PushButton deleteImageButton;
	private PushButton viewImageButton;

	
	public PhotoTombolField(String bindID){
		setBindID(bindID);
		createFields();
		createLayout();
	}	
	
	private void createFields() {
		addImageButton = new PushButton("addImageAction");
		deleteImageButton = new PushButton("deleteImageAction");
		viewImageButton = new PushButton("viewImageAction");}
	
		
	
	private void createLayout() {
		// TODO Auto-generated methodstub
		addField(createForm());
		}
	


	private GroupControl createButtons() {
		GroupControl buttons = new GroupControl();
		buttons.setLayout(new FlowLayout(FlowLayout.RIGHT));
		buttons.addField(addImageButton);
		buttons.addField(deleteImageButton);
		buttons.addField(viewImageButton);
		return buttons;
		}


	private FormField createForm()
	{
		GroupControl form = new GroupControl();
	form.addField(createButtons(), EAST);
	return form;
	}
}
		
	
	
	